package com.opencloud.ywt.provider.controller;


import com.opencloud.common.aliyun.demo.AliYunApi;
import com.opencloud.common.model.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

/**
 * 阿里云API
 * @author yeyong
 */
@Slf4j
@RestController
@Api(value = "阿里云API", tags = "阿里云API")
public class AliYunApiController {
    /**
     * 创建产品
     * @param productName
     * @param productDesc
     * @return
     */
    @ApiOperation(value = "创建产品", notes = "创建产品")
    @GetMapping("/aliyunapi/createproduct")
    public ResultBody<String> createProduct(
            @RequestParam(required = false) String productName,
            @RequestParam(required = false) String productDesc
    )
    {
        return ResultBody.ok().data(AliYunApi.createProductTest(productName,productDesc));
    }
}